Skip to content

Conversation

@Nohheechul
Copy link
Collaborator

📌 feat[law-word]:법령 검색 기능 추가

✅ 작업 내용

  • 법령 검색 기능 추가

@Nohheechul Nohheechul requested a review from Copilot September 26, 2025 00:27
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds law term search functionality to the AI lawyer application, expanding the existing precedent and law search capabilities with a new law-word feature.

  • Implements law term definition lookup with caching capability
  • Updates security configuration to expose new API endpoints
  • Enhances existing controllers with proper API documentation

Reviewed Changes

Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
SecurityConfig.java Adds public access for precedent, law, and law-word API endpoints
PrecedentService.java Refactors precedent saving logic to use batch operations and adds transaction management
Precedent.java Adds LOB annotation to caseNumber field for handling large text data
PrecedentSearchRequestDto.java Adds Swagger documentation annotations for API schema
PrecedentController.java Updates request mapping and adds API operation documentation
LawWordService.java New service for fetching and caching law term definitions from external API
LawWordRepository.java New repository interface for law word entities
LawWord.java New entity representing law terms and their definitions
LawWordController.java New controller providing law term search endpoint
LawSearchRequestDto.java Adds comprehensive Swagger documentation for all fields
LawController.java Refactors endpoints and adds API documentation
drop.sql Database cleanup script for development environment

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

package com.ai.lawyer.domain.lawWord.controller;

import com.ai.lawyer.domain.lawWord.service.LawWordService;
import com.ai.lawyer.domain.precedent.entity.Precedent;
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This import is unused in the controller. Remove the unused import statement.

Suggested change
import com.ai.lawyer.domain.precedent.entity.Precedent;

Copilot uses AI. Check for mistakes.


@PostMapping("/search")
@Operation(summary = "볍령 목록 검색 기능", description = "조건에 맞는 법령 목록을 가져옵니다")
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are typos in the Korean text. '볍령' should be '법령' in both operation summaries.

Copilot uses AI. Check for mistakes.
}

@GetMapping("/{id}")
@Operation(summary = "볍령 상세 조회 기능", description = "법령 상세 데이터를 조회합니다 \n" +
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are typos in the Korean text. '볍령' should be '법령' in both operation summaries.

Copilot uses AI. Check for mistakes.
Comment on lines +185 to +189
precedentRepository.saveAll(precedents);
precedentRepository.flush(); // 즉시 DB 반영
entityManager.clear(); // 영속성 컨텍스트 정리

return savedPrecedents;
return precedents;
Copy link

Copilot AI Sep 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new implementation removes duplicate checking that was present in the commented code. This could lead to constraint violations if duplicate precedents are saved. Consider adding duplicate checking logic or ensuring uniqueness at the database level.

Copilot uses AI. Check for mistakes.
Copy link
Collaborator

@DooHyoJeong DooHyoJeong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good

@Nohheechul Nohheechul merged commit b5a2cc0 into develop Sep 26, 2025
4 checks passed
@Nohheechul Nohheechul deleted the feat/88-law-word branch September 29, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants